import 'package:bloc/bloc.dart';
import 'package:qgchat/http/apis/video.dart';
import 'package:qgchat/http/models/tokenuserInfoModel.dart';

class TargetInfoBlocEvent {

}

class TargetInfoBlocBloc extends Bloc<TargetInfoBlocEvent, TokenuserInfoModel> {
  final String targetToken;

  TargetInfoBlocBloc({this.targetToken}) {
    add(TargetInfoBlocEvent());
  }

  @override
  Stream<TokenuserInfoModel> mapEventToState(TargetInfoBlocEvent event) async* {
    yield await VideoApis.tokenuserInfo(targetToken);
  }

  @override
  TokenuserInfoModel get initialState => TokenuserInfoModel();
}